using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;

namespace ICP_MS.Plugin.LA300;

public class FormCalibration : Form
{
	private ExperimentDatas experiment = null;

	private ExperimentDB db = null;

	private List<IsotopeInfos> fqs = new List<IsotopeInfos>();

	private List<IsotopeInfos> sas = new List<IsotopeInfos>();

	private ComboBox cbMethod = null;

	private ComboBox cbFQ = null;

	private ComboBox cbSA = null;

	private IContainer components = null;

	private TabControl tabControl2;

	private TabPage pageFQ;

	private DbufferGrid dgvFQ;

	private TabPage pageSA;

	private DbufferGrid dgvIsotopes;

	private GroupBox gbIsotopes;

	private DbufferGrid dgvSA;

	private DataGridViewTextBoxColumn colSymbolSA;

	private DataGridViewTextBoxColumn colWeightSA;

	private DataGridViewTextBoxColumn colForceSA;

	private DataGridViewCheckBoxColumn colSemiSA;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;

	private DataGridViewTextBoxColumn colSymbolFQ;

	private DataGridViewTextBoxColumn colWeightFQ;

	private DataGridViewTextBoxColumn colForceFQ;

	private DataGridViewCheckBoxColumn colSemiFQ;

	private DataGridViewTextBoxColumn colSymbol;

	private DataGridViewTextBoxColumn colMethod;

	public event EventHandler UpdateMethod = null;

	public FormCalibration()
	{
		InitializeComponent();
	}

	public void SetParams(ExperimentDatas experiment, ExperimentDB db)
	{
		this.experiment = experiment;
		this.db = db;
	}

	private void FormCalibration_Load(object sender, EventArgs e)
	{
		base.WindowState = FormWindowState.Maximized;
		((DataGridView)(object)dgvIsotopes).AutoGenerateColumns = false;
		((DataGridView)(object)dgvFQ).AutoGenerateColumns = false;
		((DataGridView)(object)dgvSA).AutoGenerateColumns = false;
		dgvIsotopes.VerCopyed += dgvIsotopes_VerCopyed;
		InitMethods();
		experiment.isotopeChanged += experiment_isotopeChanged;
		ApplyResources();
	}

	private void ApplyResources()
	{
		Text = Lang.Txt("FormCalibration.Title.Text");
		gbIsotopes.Text = Lang.Txt("FormCalibration.Columns.Symbol.Text");
		pageFQ.Text = Lang.Txt("FormCalibration.FQ.Text");
		pageSA.Text = Lang.Txt("FormCalibration.SA.Text");
		colForceFQ.HeaderText = Lang.Txt("FormCalibration.Columns.Forced.Text");
		colForceSA.HeaderText = Lang.Txt("FormCalibration.Columns.Forced.Text");
		colSemiFQ.HeaderText = Lang.Txt("FormCalibration.Columns.SemiQuant.Text");
		colSemiSA.HeaderText = Lang.Txt("FormCalibration.Columns.SemiQuant.Text");
		colSymbol.HeaderText = Lang.Txt("FormCalibration.Columns.Symbol.Text");
		colSymbolFQ.HeaderText = Lang.Txt("FormCalibration.Columns.Symbol.Text");
		colSymbolSA.HeaderText = Lang.Txt("FormCalibration.Columns.Symbol.Text");
		colWeightFQ.HeaderText = Lang.Txt("FormCalibration.Columns.Weighted.Text");
		colWeightSA.HeaderText = Lang.Txt("FormCalibration.Columns.Weighted.Text");
		colMethod.HeaderText = Lang.Txt("FormCalibration.Columns.Method.Text");
	}

	private void FormCalibration_FormClosing(object sender, FormClosingEventArgs e)
	{
		experiment.isotopeChanged -= experiment_isotopeChanged;
	}

	private void experiment_isotopeChanged(object sender, EventArgs e)
	{
		InitMethods();
	}

	private void InitMethods()
	{
		BindIsotopes();
		BindFQs();
		BindSAs();
	}

	private void BindIsotopes()
	{
		if (((DataGridView)(object)dgvIsotopes).DataSource == null)
		{
			((DataGridView)(object)dgvIsotopes).DataSource = experiment.Isotopes.FindAll((IsotopeInfos isotope) => !isotope.isInterference);
			return;
		}
		BindingContext[((DataGridView)(object)dgvIsotopes).DataSource].SuspendBinding();
		((DataGridView)(object)dgvIsotopes).DataSource = null;
		((DataGridView)(object)dgvIsotopes).DataSource = experiment.Isotopes.FindAll((IsotopeInfos isotope) => !isotope.isInterference);
		BindingContext[((DataGridView)(object)dgvIsotopes).DataSource].ResumeBinding();
	}

	private void BindFQs()
	{
		IEnumerable<IsotopeInfos> isotopes = experiment.Isotopes.Where((IsotopeInfos isotope) => isotope.method == 1);
		fqs = new List<IsotopeInfos>();
		fqs.AddRange(isotopes);
		if (((DataGridView)(object)dgvFQ).DataSource == null)
		{
			((DataGridView)(object)dgvFQ).DataSource = fqs;
			return;
		}
		BindingContext[((DataGridView)(object)dgvFQ).DataSource].SuspendBinding();
		((DataGridView)(object)dgvFQ).DataSource = null;
		((DataGridView)(object)dgvFQ).DataSource = fqs;
		BindingContext[((DataGridView)(object)dgvFQ).DataSource].ResumeBinding();
	}

	private void BindSAs()
	{
		IEnumerable<IsotopeInfos> isotopes = experiment.Isotopes.Where((IsotopeInfos isotope) => isotope.method == 2);
		foreach (IsotopeInfos isotope2 in isotopes)
		{
			if (isotope2.force == 2)
			{
				isotope2.force = 0;
			}
		}
		sas = new List<IsotopeInfos>();
		sas.AddRange(isotopes);
		if (((DataGridView)(object)dgvSA).DataSource == null)
		{
			((DataGridView)(object)dgvSA).DataSource = sas;
			return;
		}
		BindingContext[((DataGridView)(object)dgvSA).DataSource].SuspendBinding();
		((DataGridView)(object)dgvSA).DataSource = null;
		((DataGridView)(object)dgvSA).DataSource = sas;
		BindingContext[((DataGridView)(object)dgvSA).DataSource].ResumeBinding();
	}

	private void dgvIsotopes_CurrentCellChanged(object sender, EventArgs e)
	{
		DbufferGrid dgv = (DbufferGrid)((sender is DbufferGrid) ? sender : null);
		if (((DataGridView)(object)dgv).CurrentCell != null && ((DataGridView)(object)dgv).CurrentCell.ColumnIndex == colMethod.Index && !dgv.InCapture)
		{
			int columnIndex = ((DataGridView)(object)dgv).CurrentCell.ColumnIndex;
			int rowIndex = ((DataGridView)(object)dgv).CurrentCell.RowIndex;
			cbMethod = new ComboBox();
			cbMethod.Parent = (Control)(object)dgv;
			Rectangle rect = ((DataGridView)(object)dgv).GetCellDisplayRectangle(columnIndex, rowIndex, cutOverflow: false);
			cbMethod.Left = rect.Left;
			cbMethod.Top = rect.Top;
			cbMethod.Width = rect.Width;
			cbMethod.Height = rect.Height;
			cbMethod.DropDownStyle = ComboBoxStyle.DropDownList;
			cbMethod.Items.Add(Lang.Txt("FormExperiment.ConstNouns.CaliTypeNone.Text"));
			cbMethod.Items.Add(Lang.Txt("FormExperiment.ConstNouns.CaliTypeFQ.Text"));
			cbMethod.Items.Add(Lang.Txt("FormExperiment.ConstNouns.CaliTypeSA.Text"));
			cbMethod.Items.Add(Lang.Txt("FormExperiment.ConstNouns.CaliTypeSQ.Text"));
			cbMethod.SelectedIndex = experiment.Isotopes[rowIndex].method;
			cbMethod.SelectedIndexChanged += delegate
			{
				experiment.Isotopes[rowIndex].method = cbMethod.SelectedIndex;
				((DataGridView)(object)dgv).InvalidateCell(columnIndex, rowIndex);
				experiment.Isotopes[rowIndex].force = 0;
				experiment.Isotopes[rowIndex].weight = 0;
				BindFQs();
				BindSAs();
				MethodChangedNotify();
			};
		}
	}

	private void dgvIsotopes_VerCopyed(object sender, EventArgs e)
	{
		if (sender is DataGridViewCell cell && cell.ColumnIndex == colMethod.Index)
		{
			BindFQs();
			BindSAs();
			MethodChangedNotify();
		}
	}

	private void dgvIsotopes_CellLeave(object sender, DataGridViewCellEventArgs e)
	{
		if (cbMethod != null)
		{
			cbMethod.Dispose();
			cbMethod = null;
		}
	}

	private void dgvIsotopes_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		int rowIndex = e.RowIndex;
		int colIndex = e.ColumnIndex;
		if (rowIndex >= 0 && colIndex == colMethod.Index)
		{
			int index = Convert.ToInt32(e.Value);
			string value = "";
			switch (index)
			{
			case 0:
				value = Lang.Txt("FormExperiment.ConstNouns.CaliTypeNone.Text");
				e.CellStyle.BackColor = Color.White;
				break;
			case 1:
				value = Lang.Txt("FormExperiment.ConstNouns.CaliTypeFQ.Text");
				e.CellStyle.BackColor = Color.Cyan;
				break;
			case 2:
				value = Lang.Txt("FormExperiment.ConstNouns.CaliTypeSA.Text");
				e.CellStyle.BackColor = Color.Chartreuse;
				break;
			case 3:
				value = Lang.Txt("FormExperiment.ConstNouns.CaliTypeSQ.Text");
				e.CellStyle.BackColor = Color.BlueViolet;
				break;
			default:
				value = Lang.Txt("FormExperiment.ConstNouns.CaliTypeNone.Text");
				break;
			}
			e.Value = value;
		}
	}

	private void dgvFQ_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		int rowIndex = e.RowIndex;
		int colIndex = e.ColumnIndex;
		if (colIndex == colForceFQ.Index)
		{
			int index = Convert.ToInt32(e.Value);
			string value = "";
			switch (index)
			{
			case 0:
				value = Lang.Txt("FormExperiment.ConstNouns.ForceNone.Text");
				break;
			case 1:
				value = Lang.Txt("FormExperiment.ConstNouns.ForceBlank.Text");
				break;
			case 2:
				value = Lang.Txt("FormExperiment.ConstNouns.ForceOriFQ.Text");
				break;
			}
			e.Value = value;
		}
		else if (colIndex == colWeightFQ.Index)
		{
			int index2 = Convert.ToInt32(e.Value);
			string value2 = "";
			switch (index2)
			{
			case 0:
				value2 = Lang.Txt("FormExperiment.ConstNouns.WeightNone.Text");
				break;
			case 1:
				value2 = Lang.Txt("FormExperiment.ConstNouns.WeightSD.Text");
				break;
			case 2:
				value2 = Lang.Txt("FormExperiment.ConstNouns.WeightRSD.Text");
				break;
			}
			e.Value = value2;
		}
	}

	private void dgvSA_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		int rowIndex = e.RowIndex;
		int colIndex = e.ColumnIndex;
		if (colIndex == colForceSA.Index)
		{
			int index = Convert.ToInt32(e.Value);
			string value = "";
			switch (index)
			{
			case 0:
				value = Lang.Txt("FormExperiment.ConstNouns.ForceNone.Text");
				break;
			case 1:
				value = Lang.Txt("FormExperiment.ConstNouns.ForceBlank.Text");
				break;
			}
			e.Value = value;
		}
		else if (colIndex == colWeightSA.Index)
		{
			int index2 = Convert.ToInt32(e.Value);
			string value2 = "";
			switch (index2)
			{
			case 0:
				value2 = Lang.Txt("FormExperiment.ConstNouns.WeightNone.Text");
				break;
			case 1:
				value2 = Lang.Txt("FormExperiment.ConstNouns.WeightSD.Text");
				break;
			case 2:
				value2 = Lang.Txt("FormExperiment.ConstNouns.WeightRSD.Text");
				break;
			}
			e.Value = value2;
		}
	}

	private void dgvFQ_CurrentCellChanged(object sender, EventArgs e)
	{
		DataGridView dgv = sender as DataGridView;
		if (dgv.CurrentCell == null || (dgv.CurrentCell.ColumnIndex != colForceFQ.Index && dgv.CurrentCell.ColumnIndex != colWeightFQ.Index))
		{
			return;
		}
		int columnIndex = dgv.CurrentCell.ColumnIndex;
		int rowIndex = dgv.CurrentCell.RowIndex;
		cbFQ = new ComboBox();
		cbFQ.Parent = dgv;
		Rectangle rect = dgv.GetCellDisplayRectangle(columnIndex, rowIndex, cutOverflow: false);
		cbFQ.Left = rect.Left;
		cbFQ.Top = rect.Top;
		cbFQ.Width = rect.Width;
		cbFQ.Height = rect.Height;
		cbFQ.DropDownStyle = ComboBoxStyle.DropDownList;
		if (dgv.CurrentCell.ColumnIndex == colForceFQ.Index)
		{
			cbFQ.Items.Add(Lang.Txt("FormExperiment.ConstNouns.ForceNone.Text"));
			cbFQ.Items.Add(Lang.Txt("FormExperiment.ConstNouns.ForceBlank.Text"));
			cbFQ.Items.Add(Lang.Txt("FormExperiment.ConstNouns.ForceOriFQ.Text"));
			cbFQ.SelectedIndex = experiment.Isotopes[rowIndex].force;
			cbFQ.SelectedIndexChanged += delegate
			{
				fqs[rowIndex].force = cbFQ.SelectedIndex;
				dgv.InvalidateCell(columnIndex, rowIndex);
			};
		}
		else
		{
			cbFQ.Items.Add(Lang.Txt("FormExperiment.ConstNouns.WeightNone.Text"));
			cbFQ.Items.Add(Lang.Txt("FormExperiment.ConstNouns.WeightSD.Text"));
			cbFQ.Items.Add(Lang.Txt("FormExperiment.ConstNouns.WeightRSD.Text"));
			cbFQ.SelectedIndex = experiment.Isotopes[rowIndex].weight;
			cbFQ.SelectedIndexChanged += delegate
			{
				fqs[rowIndex].weight = cbFQ.SelectedIndex;
				dgv.InvalidateCell(columnIndex, rowIndex);
			};
		}
	}

	private void dgvSA_CurrentCellChanged(object sender, EventArgs e)
	{
		DataGridView dgv = sender as DataGridView;
		if (dgv.CurrentCell == null || (dgv.CurrentCell.ColumnIndex != colForceSA.Index && dgv.CurrentCell.ColumnIndex != colWeightSA.Index))
		{
			return;
		}
		int columnIndex = dgv.CurrentCell.ColumnIndex;
		int rowIndex = dgv.CurrentCell.RowIndex;
		cbSA = new ComboBox();
		cbSA.Parent = dgv;
		Rectangle rect = dgv.GetCellDisplayRectangle(columnIndex, rowIndex, cutOverflow: false);
		cbSA.Left = rect.Left;
		cbSA.Top = rect.Top;
		cbSA.Width = rect.Width;
		cbSA.Height = rect.Height;
		cbSA.DropDownStyle = ComboBoxStyle.DropDownList;
		if (dgv.CurrentCell.ColumnIndex == colForceSA.Index)
		{
			cbSA.Items.Add(Lang.Txt("FormExperiment.ConstNouns.ForceNone.Text"));
			cbSA.Items.Add(Lang.Txt("FormExperiment.ConstNouns.ForceBlank.Text"));
			cbSA.SelectedIndex = experiment.Isotopes[rowIndex].force;
			cbSA.SelectedIndexChanged += delegate
			{
				sas[rowIndex].force = cbSA.SelectedIndex;
				dgv.InvalidateCell(columnIndex, rowIndex);
			};
			return;
		}
		cbSA.Items.Add(Lang.Txt("FormExperiment.ConstNouns.WeightNone.Text"));
		cbSA.Items.Add(Lang.Txt("FormExperiment.ConstNouns.WeightSD.Text"));
		cbSA.Items.Add(Lang.Txt("FormExperiment.ConstNouns.WeightRSD.Text"));
		cbSA.SelectedIndex = experiment.Isotopes[rowIndex].weight;
		cbSA.SelectedIndexChanged += delegate
		{
			sas[rowIndex].weight = cbSA.SelectedIndex;
			dgv.InvalidateCell(columnIndex, rowIndex);
		};
	}

	private void dgvFQ_CellLeave(object sender, DataGridViewCellEventArgs e)
	{
		if (cbFQ != null)
		{
			cbFQ.Dispose();
			cbFQ = null;
		}
	}

	private void dgvSA_CellLeave(object sender, DataGridViewCellEventArgs e)
	{
		DisposeBoxes();
	}

	private void DisposeBoxes()
	{
		if (cbMethod != null)
		{
			cbMethod.Dispose();
			cbMethod = null;
		}
		if (cbSA != null)
		{
			cbSA.Dispose();
			cbSA = null;
		}
		if (cbFQ != null)
		{
			cbFQ.Dispose();
			cbFQ = null;
		}
	}

	public void SelectedChanged(object sender, EventArgs e)
	{
		ToolStripButton btn = sender as ToolStripButton;
		if (btn.Checked)
		{
			DisposeBoxes();
		}
	}

	private void MethodChangedNotify()
	{
		experiment.OnMethodChanged();
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0034: Expected O, but got Unknown
		//IL_006c: Unknown result type (might be due to invalid IL or missing references)
		//IL_0076: Expected O, but got Unknown
		//IL_00a3: Unknown result type (might be due to invalid IL or missing references)
		//IL_00ad: Expected O, but got Unknown
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
		this.tabControl2 = new System.Windows.Forms.TabControl();
		this.pageFQ = new System.Windows.Forms.TabPage();
		this.dgvFQ = new DbufferGrid();
		this.colSymbolFQ = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colWeightFQ = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colForceFQ = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSemiFQ = new System.Windows.Forms.DataGridViewCheckBoxColumn();
		this.pageSA = new System.Windows.Forms.TabPage();
		this.dgvSA = new DbufferGrid();
		this.colSymbolSA = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colWeightSA = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colForceSA = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSemiSA = new System.Windows.Forms.DataGridViewCheckBoxColumn();
		this.dgvIsotopes = new DbufferGrid();
		this.colSymbol = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colMethod = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.gbIsotopes = new System.Windows.Forms.GroupBox();
		this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.tabControl2.SuspendLayout();
		this.pageFQ.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.dgvFQ).BeginInit();
		this.pageSA.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.dgvSA).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvIsotopes).BeginInit();
		this.gbIsotopes.SuspendLayout();
		base.SuspendLayout();
		this.tabControl2.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
		this.tabControl2.Controls.Add(this.pageFQ);
		this.tabControl2.Controls.Add(this.pageSA);
		this.tabControl2.Location = new System.Drawing.Point(347, 22);
		this.tabControl2.Name = "tabControl2";
		this.tabControl2.SelectedIndex = 0;
		this.tabControl2.Size = new System.Drawing.Size(487, 527);
		this.tabControl2.TabIndex = 16;
		this.pageFQ.Controls.Add((System.Windows.Forms.Control)(object)this.dgvFQ);
		this.pageFQ.Location = new System.Drawing.Point(4, 22);
		this.pageFQ.Name = "pageFQ";
		this.pageFQ.Padding = new System.Windows.Forms.Padding(3);
		this.pageFQ.Size = new System.Drawing.Size(479, 501);
		this.pageFQ.TabIndex = 0;
		this.pageFQ.Text = "全定量";
		this.pageFQ.UseVisualStyleBackColor = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).BackgroundColor = System.Drawing.SystemColors.Control;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
		dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).Columns.AddRange(this.colSymbolFQ, this.colWeightFQ, this.colForceFQ, this.colSemiFQ);
		((System.Windows.Forms.Control)(object)this.dgvFQ).Dock = System.Windows.Forms.DockStyle.Fill;
		this.dgvFQ.HorCopy = false;
		((System.Windows.Forms.Control)(object)this.dgvFQ).Location = new System.Drawing.Point(3, 3);
		((System.Windows.Forms.Control)(object)this.dgvFQ).Name = "dgvFQ";
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvFQ).Size = new System.Drawing.Size(473, 495);
		((System.Windows.Forms.Control)(object)this.dgvFQ).TabIndex = 14;
		this.dgvFQ.VerCopy = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvFQ_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(dgvFQ_CellLeave);
		((System.Windows.Forms.DataGridView)(object)this.dgvFQ).CurrentCellChanged += new System.EventHandler(dgvFQ_CurrentCellChanged);
		this.colSymbolFQ.DataPropertyName = "symbol";
		this.colSymbolFQ.HeaderText = "符号";
		this.colSymbolFQ.Name = "colSymbolFQ";
		this.colSymbolFQ.ReadOnly = true;
		this.colSymbolFQ.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colSymbolFQ.Width = 80;
		this.colWeightFQ.DataPropertyName = "weight";
		this.colWeightFQ.HeaderText = "加权";
		this.colWeightFQ.Name = "colWeightFQ";
		this.colWeightFQ.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.colWeightFQ.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colWeightFQ.Width = 120;
		this.colForceFQ.DataPropertyName = "force";
		this.colForceFQ.HeaderText = "强制通过";
		this.colForceFQ.Name = "colForceFQ";
		this.colSemiFQ.DataPropertyName = "semiquant";
		this.colSemiFQ.HeaderText = "半定量";
		this.colSemiFQ.Name = "colSemiFQ";
		this.pageSA.Controls.Add((System.Windows.Forms.Control)(object)this.dgvSA);
		this.pageSA.Location = new System.Drawing.Point(4, 22);
		this.pageSA.Name = "pageSA";
		this.pageSA.Padding = new System.Windows.Forms.Padding(3);
		this.pageSA.Size = new System.Drawing.Size(479, 501);
		this.pageSA.TabIndex = 1;
		this.pageSA.Text = "标准加入";
		this.pageSA.UseVisualStyleBackColor = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).BackgroundColor = System.Drawing.SystemColors.Control;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
		dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).Columns.AddRange(this.colSymbolSA, this.colWeightSA, this.colForceSA, this.colSemiSA);
		((System.Windows.Forms.Control)(object)this.dgvSA).Dock = System.Windows.Forms.DockStyle.Fill;
		this.dgvSA.HorCopy = false;
		((System.Windows.Forms.Control)(object)this.dgvSA).Location = new System.Drawing.Point(3, 3);
		((System.Windows.Forms.Control)(object)this.dgvSA).Name = "dgvSA";
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvSA).Size = new System.Drawing.Size(473, 495);
		((System.Windows.Forms.Control)(object)this.dgvSA).TabIndex = 15;
		this.dgvSA.VerCopy = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvSA_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(dgvSA_CellLeave);
		((System.Windows.Forms.DataGridView)(object)this.dgvSA).CurrentCellChanged += new System.EventHandler(dgvSA_CurrentCellChanged);
		this.colSymbolSA.DataPropertyName = "symbol";
		this.colSymbolSA.HeaderText = "符号";
		this.colSymbolSA.Name = "colSymbolSA";
		this.colSymbolSA.ReadOnly = true;
		this.colSymbolSA.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colSymbolSA.Width = 80;
		this.colWeightSA.DataPropertyName = "weight";
		this.colWeightSA.HeaderText = "加权";
		this.colWeightSA.Name = "colWeightSA";
		this.colWeightSA.ReadOnly = true;
		this.colWeightSA.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.colWeightSA.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colWeightSA.Width = 120;
		this.colForceSA.DataPropertyName = "force";
		this.colForceSA.HeaderText = "强制通过";
		this.colForceSA.Name = "colForceSA";
		this.colForceSA.ReadOnly = true;
		this.colSemiSA.DataPropertyName = "semiquant";
		this.colSemiSA.HeaderText = "半定量";
		this.colSemiSA.Name = "colSemiSA";
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).BackgroundColor = System.Drawing.SystemColors.Control;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
		dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).Columns.AddRange(this.colSymbol, this.colMethod);
		((System.Windows.Forms.Control)(object)this.dgvIsotopes).Dock = System.Windows.Forms.DockStyle.Fill;
		this.dgvIsotopes.HorCopy = false;
		((System.Windows.Forms.Control)(object)this.dgvIsotopes).Location = new System.Drawing.Point(3, 17);
		((System.Windows.Forms.Control)(object)this.dgvIsotopes).Name = "dgvIsotopes";
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvIsotopes).Size = new System.Drawing.Size(307, 526);
		((System.Windows.Forms.Control)(object)this.dgvIsotopes).TabIndex = 14;
		this.dgvIsotopes.VerCopy = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvIsotopes_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(dgvIsotopes_CellLeave);
		((System.Windows.Forms.DataGridView)(object)this.dgvIsotopes).CurrentCellChanged += new System.EventHandler(dgvIsotopes_CurrentCellChanged);
		this.colSymbol.DataPropertyName = "symbol";
		this.colSymbol.HeaderText = "符号";
		this.colSymbol.Name = "colSymbol";
		this.colSymbol.ReadOnly = true;
		this.colSymbol.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colSymbol.Width = 80;
		this.colMethod.DataPropertyName = "method";
		this.colMethod.HeaderText = "方法";
		this.colMethod.Name = "colMethod";
		this.colMethod.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.colMethod.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colMethod.Width = 120;
		this.gbIsotopes.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left;
		this.gbIsotopes.Controls.Add((System.Windows.Forms.Control)(object)this.dgvIsotopes);
		this.gbIsotopes.Location = new System.Drawing.Point(12, 6);
		this.gbIsotopes.Name = "gbIsotopes";
		this.gbIsotopes.Size = new System.Drawing.Size(313, 546);
		this.gbIsotopes.TabIndex = 17;
		this.gbIsotopes.TabStop = false;
		this.gbIsotopes.Text = "元素";
		this.dataGridViewTextBoxColumn1.DataPropertyName = "symbol";
		this.dataGridViewTextBoxColumn1.HeaderText = "符号";
		this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
		this.dataGridViewTextBoxColumn1.ReadOnly = true;
		this.dataGridViewTextBoxColumn1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn1.Width = 80;
		this.dataGridViewTextBoxColumn2.DataPropertyName = "weight";
		this.dataGridViewTextBoxColumn2.HeaderText = "加权";
		this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
		this.dataGridViewTextBoxColumn2.ReadOnly = true;
		this.dataGridViewTextBoxColumn2.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.dataGridViewTextBoxColumn2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn2.Width = 120;
		this.dataGridViewTextBoxColumn3.DataPropertyName = "force";
		this.dataGridViewTextBoxColumn3.HeaderText = "强制通过";
		this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
		this.dataGridViewTextBoxColumn3.ReadOnly = true;
		this.dataGridViewTextBoxColumn4.DataPropertyName = "symbol";
		this.dataGridViewTextBoxColumn4.HeaderText = "符号";
		this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
		this.dataGridViewTextBoxColumn4.ReadOnly = true;
		this.dataGridViewTextBoxColumn4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn4.Width = 80;
		this.dataGridViewTextBoxColumn5.DataPropertyName = "weight";
		this.dataGridViewTextBoxColumn5.HeaderText = "加权";
		this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
		this.dataGridViewTextBoxColumn5.ReadOnly = true;
		this.dataGridViewTextBoxColumn5.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn5.Width = 120;
		this.dataGridViewTextBoxColumn6.DataPropertyName = "force";
		this.dataGridViewTextBoxColumn6.HeaderText = "强制通过";
		this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
		this.dataGridViewTextBoxColumn6.ReadOnly = true;
		this.dataGridViewTextBoxColumn7.DataPropertyName = "symbol";
		this.dataGridViewTextBoxColumn7.HeaderText = "符号";
		this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
		this.dataGridViewTextBoxColumn7.ReadOnly = true;
		this.dataGridViewTextBoxColumn7.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn7.Width = 80;
		this.dataGridViewTextBoxColumn8.DataPropertyName = "method";
		this.dataGridViewTextBoxColumn8.HeaderText = "方法";
		this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
		this.dataGridViewTextBoxColumn8.ReadOnly = true;
		this.dataGridViewTextBoxColumn8.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.dataGridViewTextBoxColumn8.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn8.Width = 120;
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(846, 564);
		base.Controls.Add(this.gbIsotopes);
		base.Controls.Add(this.tabControl2);
		base.Name = "FormCalibration";
		base.ShowIcon = false;
		this.Text = "FormCalibration";
		base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormCalibration_FormClosing);
		base.Load += new System.EventHandler(FormCalibration_Load);
		this.tabControl2.ResumeLayout(false);
		this.pageFQ.ResumeLayout(false);
		((System.ComponentModel.ISupportInitialize)this.dgvFQ).EndInit();
		this.pageSA.ResumeLayout(false);
		((System.ComponentModel.ISupportInitialize)this.dgvSA).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvIsotopes).EndInit();
		this.gbIsotopes.ResumeLayout(false);
		base.ResumeLayout(false);
	}
}
